The following are the attributes of the MENUITEM
tag:
NAME Is the menu item name that appears in the menu. (An underscore indicates that the following letter is the command's mnemonic (Windows only).) Required.
ID Is used by Dreamweaver to identify the item. The ID
must be unique throughout the menu structure. If you add new menu items to menus.xml, use your company name or another unique string as a prefix for each menu item's ID
, to ensure uniqueness. Required.
KEY Is the keyboard shortcut for the command, if any. Use the following strings to specify modifier keys:
![]() |
Cmd specifies the Control key (Windows) or Command key (Macintosh). |
![]() |
Alt and Opt interchangeably specify the Alt key (Windows) or Option key (Mac). |
![]() |
Shift specifies the Shift key on both platforms. |
![]() |
Ctrl specifies the Control key on both platforms. |
![]() |
A plus (+) sign separates modifier keys if a given shortcut uses more than one modifier. For example, Cmd+Opt+5 in the KEY attribute means the menu item is executed by pressing Control+Alt+5 (Windows) or Command+Option+5 (Macintosh). |
![]() |
Special keys are specified by name: F1 through F12, PgDn, PgUp, Home, End, Ins, Del, Tab, Esc, BkSp, and Space. Modifier keys can also be applied to special keys. |
PLATFORM Indicates which platform the item appears on. Valid values are win
, meaning Windows-only, or mac
, meaning Macintosh-only. The default (if you don't specify this attribute) is for the item to appear on both platforms.
ENABLED Is the name of a JavaScript function that determines whether the menu item is currently enabled. If the function returns false
, the menu item is dimmed.
COMMAND Is a JavaScript expression that's executed when the user selects this item from the menu. For complex JavaScript code, use a JavaScript file (specified with the FILE
attribute) instead. Either FILE
or COMMAND
must be specified for each menu item.
FILE Is the name of an HTML file containing JavaScript that controls the menu item. The path specified in the FILE
attribute is relative to the Configuration folder. Note that the FILE
attribute overrides the COMMAND
, ENABLED
, and CHECKED
attributes. Either FILE
or COMMAND
must be specified for each menu item. For information on creating a command file using the History palette, see Creating new commands from history steps. For information on writing your own JavaScript commands from scratch, see Extending Dreamweaver.
CHECKED Is a JavaScript expression that indicates whether the menu item has a check mark next to it in the menu; if the expression evaluates as true
, the item is displayed with a check mark.
DYNAMIC, If present, indicates that a menu item is to be determined dynamically, by an HTML file that contains JavaScript code to set the text and state of the menu item. If you specify a tag as DYNAMIC
, you must also specify a FILE
attribute.